package com.eddie.community.service;

import com.eddie.community.entity.Message;
import org.springframework.web.util.HtmlUtils;

import java.util.List;

/**
 * Description:消息业务
 * Date: 2021/2/28 0028 14:46
 * Author: Eddie.Zhan
 * Email: eddie_zhan@yeah.net
 */
public interface MessageService {
    //查询对话
    List<Message> findConversations(int userId, int offset, int limit);

    //对话计数
    int findConversationCount(int userId);

    //查找私信
    List<Message> findLetters(String conversationId, int offset, int limit);

    //私信计数
    int findLetterCount(String conversationId);

    //未读数
    int findLetterUnreadCount(int userId, String conversationId);

    //添加消息
    int addMessage(Message message);

    //消息已读
    int readMessage(List<Integer> ids);

    //查找最新通知
    Message findLatestNotice(int userId, String topic);

    //查找系统公告
    Message findSystemNotice(String topic);


    //查找通知计数
    int findNoticeCount(int userId, String topic);

    //查找通知未读计数
    int findNoticeUnreadCount(int userId, String topic);

    //查找公告
    List<Message> findNotices(int userId, String topic, int offset, int limit);

}
